﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true"
    CodeBehind="UserList.aspx.cs" Inherits="DomMgmtSystem.View.UserList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <table cellpadding="0" cellspacing="0" class="table table-bordered table-hover" width="100%">
        <tr>
            <td class="tableleft" style="width: 150px">
                登录名：
            </td>
            <td>
                <asp:TextBox ID="txtUserName" runat="server" Width="150px"></asp:TextBox>
            </td>
            <td class="tableleft" style="width: 150px">
                中文名：
            </td>
            <td>
                <asp:TextBox ID="txtNickName" runat="server" Width="150px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" colspan="4">
                <asp:Button ID="btnSearch" runat="server" class="btn btn-primary" Text="查 询" OnClick="btnSearch_Click" />
            </td>
        </tr>
    </table>
    <table class="table table-bordered table-hover" id="list">
        <tr>
            <td class="head" style="display: none">
                序号ID
            </td>
            <th>
                登录名
            </th>
            <th>
                中文名
            </th>
            <th>
                角色
            </th>
            <th width="300px">
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <ItemTemplate>
                <tr>
                    <td style="display: none">
                        <%--序号ID--%><%#Eval("NID")%>
                    </td>
                    <td>
                        <%--序号ID--%><%#Eval("CUSERNAME")%>
                    </td>
                    <td>
                        <%--摄区代号--%><%#Eval("CNICKNAME")%>
                    </td>
                    <td>
                        <%--硬盘是否能读--%><%#Eval("NTYPE").ToString() == "1" ? "管理员" : "普通用户"%>
                    </td>
                    <td>
                        <a href='UserAdd.aspx?NID=<%#Eval("NID")%>&view=true'>查看</a> <a href='UserAdd.aspx?NID=<%#Eval("NID")%>&IsNew=false'>
                            编辑</a>
                        <asp:LinkButton ID="lbDel" runat="server" CommandName="Del" CommandArgument='<%#Eval("NID") %>'
                            OnClientClick="javascript:if(confirm('确定要删除吗？'))return true;else  return false;">删除</asp:LinkButton>
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="RetPwd" CommandArgument='<%#Eval("NID") %>'
                            OnClientClick="javascript:if(confirm('确定要重置密码吗？'))return true;else  return false;">重置密码</asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <!--分页列表-->
    <div class="inline pull-right page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="569px" UrlPaging="True"
            TextBeforePageIndexBox="转到" TextAfterPageIndexBox="页" SubmitButtonText="Go" ShowPageIndexBox="Never"
            PrevPageText="上一页" PageSize="14" PageIndexBoxType="DropDownList" OnPageChanging="AspNetPager1_PageChanging"
            NumericButtonTextFormatString="[{0}]" NumericButtonCount="5" NextPageText="下一页"
            LastPageText="尾页" ForeColor="Black" FirstPageText="首页" CurrentPageButtonTextFormatString="[{0}]"
            ButtonImageAlign="Middle">
        </webdiyer:AspNetPager>
    </div>
</asp:Content>
